package com.mui.controls
{
	import com.mui.manager.IToolTip;
	
	import flash.display.*;
	
	public class BaseToolTip extends Sprite implements IToolTip
	{
		protected var paddingTop:Number = 5;
		protected var paddingBottom:Number = 5;
		protected var paddingLeft:Number = 5;
		protected var paddingRight:Number = 5;
		protected var _width:Number;
		protected var _height:Number;
		protected var contentContainer:DisplayObjectContainer;
		
		public function BaseToolTip()
		{
			this.contentContainer = new Sprite();
		}
		
		protected function updateSize(W:Number, H:Number) : void
		{
		}
		
		public function set data(value:*) : void
		{
			this._width = this.contentContainer.width + this.paddingLeft + this.paddingRight;
			this._height = this.contentContainer.height + this.paddingTop + this.paddingBottom;
			this.contentContainer.y = this.paddingTop;
			this.contentContainer.x = this.paddingLeft;
			this.updateSize(this._width, this._height);
		}
	}
}
